package cre.sample.test.encoding;

/**
 * @Author penglai
 * @Date 2016/10/10.
 */
public class CharUtils {
    public static void main(String[] args) {
        String s = "ع";
        char c = s.charAt(0);
        System.out.println(c + " --> " + Integer.toHexString(c));
        System.out.println(c+"c --> ddd"+Integer.toHexString(c));

        String s1 = new String(Character.toChars(0x1d306));
        System.out.println(s1);
        char c1 = s1.charAt(0);
        System.out.println(c1);
        System.out.println(s1.codePointAt(0));
        System.out.println(s1.length());
        System.out.println(s1.codePointCount(0, s1.length()));

        System.out.println("#################");
        String str = new String(Character.toChars(0x591a));
        System.out.println(str);
        HexUtils.toHex(str.toCharArray(),"chars");
    }
}
